package com.example.music.mapper;

import com.example.music.domain.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User login(User user);

    List<Role> getRole();

    int register(User user);

    User checkEmail(@Param("email") String email);

    int updatePassword(User user);

    void expertLogin(User expertLoginUser);


    List<User> searchUser(@Param("username") String username);

    int deleteUser(@Param("id") Integer id);

    int uploadSong(Song song);

    List<Song> getSong(@Param("uId") Integer uId,@Param("roleId") Integer roleId,@Param("keyword") String keyword);

    Song getSongById(@Param("songId") Integer songId);

    List<Song> getSongByKind(@Param("kindId") Integer kindId,@Param("keyword") String keyword,@Param("uId")Integer uId);

    List<SongKind> getSongKind();

    U3DSong getU3dSongInfo(@Param("songId") Integer songId);

    int updateHeadPortrait(@Param("id") Integer id, @Param("headPortrait") String headPortrait);


    int insertReport(Report report);

    List<ReportResult> getUserReportSong(@Param("id") Integer id,@Param("keyword") String keyword);

    long delUserReportSong(@Param("reportId") Integer reportId);

    String downloadReportSong(@Param("reportId") Integer reportId);

    long changePublicity(@Param("reportId") Integer reportId,@Param("publicity") boolean publicity);

    String downloadOriginSong(@Param("songId") Integer songId);

    List<ReportDynamic> getReportDynamic(@Param("keyword") String keyword,@Param("uid") Integer uid);

    int u3dInsertReport(Report report);

    int delSong(@Param("songId") Integer songId);

    Song getIndexSong();

    List<ExperimentReport> getExperimentReport(@Param("keyword") String keyword,@Param("roleId") Integer roleId,@Param("id") Integer id);

    User checkUsername(User user);

    Integer updateSong(Song song);

    String getReportSongPath(@Param("reportId") Integer reportId);

    void updateMusicName(@Param("songName") String songName,@Param("songId") Integer songId);

    List<ReportDynamic> getReportDynamicPsyh(@Param("keyword") String keyword,@Param("uid") Integer uid);

    User loginUser(User u);

    void delSelfSong(@Param("id") Integer id);

    Integer uploadLyric(List<Lyrics> lyricsList);

    List<U3DLyrics> getLyrics(@Param("songId") Integer songId);

    Integer adminComment(ExperimentReport experimentReport);

    void deleteLyrics(Integer songId);

}
